import React from 'react'
import { useLocation } from 'react-router-dom'

const NoMatch: React.FC = () => {
  const location = useLocation()

  return (
    <div>
      404: No match
      {location.state && (
        <span> for <code>{location.state.referrer}</code></span>
      )}
    </div>
  )
}

export default NoMatch
